<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>custom-text-selection</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        ::selection {
            background-color: rgba(0,0,0,.85);
            background-color: #f2f3f4;
        }
        .custom-text-selection::selection {
            color:rgba(255,255,255,.85);
            background-color: #2396ef;
        }
    </style>
</head>
<body>
    <p class="custom-text-selection">Select some of this text</p>
</body>
</html>